package recursion;

import java.util.Arrays;

public class MergeSort {
    public static void main(String[] args) {
        //定义数组--------------------
        int[] arr = new int[10];
        for (int i=0;i<arr.length;i++) {
            arr[i] = (int)(Math.random()*100)+1;
    }
        System.out.println(Arrays.toString(arr));
        //归并排序--------------------
        MergeSort(arr, 0, arr.length - 1);
    }
    private static void MergeSort(int[] arr,int left,int right) {
        int mid = (left + right) / 2;
        MergeSort(arr, left, mid);
        MergeSort(arr, mid + 1, right);
        merge(arr, left, mid, right);
    }

    private static void merge(int[] arr, int left, int mid, int right) {

    }
}
